<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
<head>
    <th:block th:include="include :: header('商家店铺列表')" />
</head>
<body class="gray-bg">
     <div class="container-div">
        <div class="row">
            <div class="col-sm-12 select-table table-striped">
                <table id="bootstrap-table"></table>
            </div>
        </div>
    </div>
    <th:block th:include="include :: footer" />
    <script th:inline="javascript">

        var prefix = ctx + "WxShop/WxShop";

        $(function() {
            var options = {
                url: prefix + "/selectOneShop",
                showSearch:false,
                showRefresh:false,
                showColumns:false,
                showToggle:false,
                modalName: "商家店铺",
                columns: [{
                    checkbox: true
                },
                {
                    field: 'id', 
                    title: 'null',
                    visible: false
                },
                {
                    field: 'shopName', 
                    title: '商铺名称'
                },
                {
                    field: 'shopTel', 
                    title: '店铺电话'
                },
                {
                    field: 'shopMoney', 
                    title: '商户余额'
                },

                {
                    field: 'shopAdress', 
                    title: '店铺地址'
                },
                {
                    title: '操作',
                    align: 'center',
                    formatter: function(value, row, index) {
                        var actions = [];
                        actions.push('<a class="btn btn-warning btn-xs" href="javascript:void(0)" onclick="editShop(\'' + row.id + '\')"><i class="fa fa-edit"></i>修改参数</a> ');
                       // actions.push('<a class="btn btn-danger btn-xs" href="javascript:void(0)" onclick="selectCarousel(\'' + row.id + '\')"><i class="fa fa-search"></i>店铺轮播</a> ');
                        return actions.join('');
                    }
                }]
            };
            $.table.init(options);
        });

        function editShop(id){
            $.modal.openFull("修改参数",prefix+"/editShop/"+id);
        }


    </script>
</body>
</html>